package samplegameplugin;

import gamefw.gameplugin.GameEntity;

public class SampleGameEntity extends GameEntity {
	
	private String entityName;
	
	public SampleGameEntity(String entityName) {
		this.entityName = entityName;
	}

	@Override
	public String getVisualResource(String resourceType) {
		String resource = null;
		
		if (resourceType.equals("txt")) {
			if (this.entityName.equals("0")) {
				resource = "P1.txt";
			} else {
				resource = "P2.txt";
			}
		} else if (resourceType.equals("png")) {
			if (this.entityName.equals("0")) {
				resource = "P1.png";
			} else {
				resource = "P2.png";
			}
		} else {
			return null;
		}
		
		return this.getClass().getResource(resource).getFile();
	}

}
